import Vue from 'vue'
import VueRouter from 'vue-router'

export default function (baseUrl = '', routerList) {
  Vue.use(VueRouter)
  return new VueRouter({
    base: baseUrl || '',
    mode: 'history',
    routes: routerList
  })
}
